package com.enba.boot.core.utils;

import java.util.ArrayList;
import java.util.List;
import lombok.Data;

@Data
public class TreeNode {
  // 节点ID
  private Long id;

  // 父节点ID
  private Long parentId;

  // 节点名称
  private String name;

  // 子节点列表
  private List<TreeNode> children = new ArrayList<>();

  public TreeNode(Long id, Long parentId, String name) {
    this.id = id;
    this.parentId = parentId;
    this.name = name;
  }

  public TreeNode(){}
}
